package com.key.org.service.serviceImp;

import com.key.base.service.serviceImp.BaseServiceImp;
import com.key.org.dao.IPersonDao;
import com.key.org.model.Person;
import com.key.org.service.IPersonService;

public class PersonServiceImp extends BaseServiceImp implements IPersonService {
	IPersonDao personDao;

	public IPersonDao getPersonDao() {
		return personDao;
	}

	public void setPersonDao(IPersonDao personDao) {
		this.personDao = personDao;
	}

	/**
	 * model
	 * 
	 * @param person
	 */
	@Override
	public void add(Person person) throws Exception {
		try {
			personDao.add(person);
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	/**
	 * model
	 * 
	 * @param person
	 */
	@Override
	public void update(Person person) throws Exception {
		try {
			personDao.update(person);
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}
}
